home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
dev
/
amos
/
ProcLib20.lha
/
Text
/
MESSAGEBOX.Amos
/
MESSAGEBOX.amosSourceCode
Wrap
AMOS Source Code
|
1993-10-27
|
904b
|
40 lines
Screen Open 0,320,200,32,0 : Flash Off : Curs Off : Cls 0
M_DISP[$110,'A colourful message box!']
Wait 170
M_CLEAR
Procedure M_DISP[CLR,MESSAGE$]
' display a message while loading stuff
Flash Off : Curs Off : Cls 0 : Paper 0
' set up variables
WID=Len(MESSAGE$) : Y1=14*8-1 : Y2=15*8
XCH=20-WID/2 : X1=XCH*8-1 : X2=WID+XCH : X2=X2*8
' now setup palette
For N=1 To 15
SH=CLR*N
Colour N,SH
Colour 30-N,SH
Next N
' draw boxes
Ink 1 : I=0 : C=29
For N=1 To 20
Inc I : If I=C Then I=1
Ink I
Dec X1 : Dec Y1 : Inc X2 : Inc Y2
Box X1,Y1 To X2,Y2
Next N
' message
Locate XCH,14
For N=1 To WID
Inc I : If I=C Then I=1
Pen I
Print Mid$(MESSAGE$,N,1)+"";
Next N
' and step thru it..
Shift Up 2,1,C-1,1
End Proc
Procedure M_CLEAR
' clear message
Shift Off
Fade 1 : Wait 15
Cls
End Proc